package com.szj360.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class StringUtils {

	public static String matchRegex(String pattern, String str, int groupNum) {

		String ret = "";
		if (str != null) {
			Matcher m2 = Pattern.compile(pattern).matcher(str);
			if (m2.find()) {
				ret = m2.group(groupNum);
			}
		}
		return ret;
	}
}
